<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../../include/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>期数客户列表</title>
    <style type="text/css">
        html, body {
            margin: 0;
            padding: 0;
            border: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

    </style>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <link href="/css/demo.css" rel="stylesheet" type="text/css"/>
    <script src="/scripts/boot.js" type="text/javascript"></script>
</head>
<body>

<div style="padding-bottom:5px;padding-left: 0px;">

    <div id="form1">
        <table border="0" cellpadding="1" cellspacing="2">
            <tr>
                <td>
                    <input name="globalKey" id="globalKey" emptyText="请输入客户信息" class="mini-textbox" onenter="search"/>
                </td>
            </tr>
        </table>
    </div>
</div>
<div id="datagrid1" class="mini-datagrid" style="width:99%;height:85%;"
     url="/gamblingRecord/queryGamblingRecord.action" idField="id" allowResize="true" allowCellWrap="true"
     >
    <div property="columns">
        <div type="indexcolumn"></div>
        <div field="userName" width="100" headerAlign="center" align="center">客户名</div>
        <div field="count" width="80" headerAlign="center" align="center">购买份数</div>
        <div field="buyTimeDate" dateFormat="yyyy-MM-dd HH:mm:ss" width="100" headerAlign="center" align="center">购买时间</div>
        <div field="count" width="80" headerAlign="center" align="center">购买总价</div>
        <div field="gamblingNumbers" width="200" headerAlign="center" align="center">夺宝号</div>
    </div>
</div>

<script type="text/javascript">

    mini.parse();
    var grid = mini.get("datagrid1");
    var form = new mini.Form("#form1"); //获取表单对象
    var globalPeriodId;
    //查询
    function search() {
        var data = form.getData();      //获取表单多个控件的数据
        data.periodId = globalPeriodId;
        var json = mini.encode(data);   //序列化成JSON
        grid.load({json: json});
    }

    function clean() {
        form.reset();
    }
    function SetData(data){
        var obj = new Object();
        globalPeriodId=data.periodId;
    	obj.periodId = data.periodId;
    	var json = mini.encode(obj);
        grid.load({json:json});
    }
</script>
</body>
</html>
